<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" /><meta content="telephone=no" name="format-detection" />
<link href="../assets/mobile/comm.css" rel="stylesheet" type="text/css" />
<link href="../assets/mobile/goods.css" rel="stylesheet" type="text/css" />
<link href="../assets/mobile/top.css" rel="stylesheet" type="text/css" />
<script src="../assets/js/mobile/jquery190.js" type="text/javascript"></script>
<link rel="stylesheet" href="../assets/agile/css/ratchet/css/ratchet.min.css">
<link rel="stylesheet" href="../assets/agile/css/flat/flat.component.css">
<link rel="stylesheet" href="../assets/agile/css/flat/iconline.css">
<link rel="stylesheet" href="../assets/app/css/app.css" />
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/local.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script src="../assets/js/mobile/GoodsPicSlider.js" type="text/javascript"></script>
</head>
<body>
<!--通用顶部-->
<div id="ios-top-box">
    <div id="header" class="bar bar-nav">
    <div class="titlebar">
    <a href="javascript:appClose('js_result',api);"><i class="iconfont iconline-arrow-left" style="left:0px;"></i></a>
    <h1 class="title">揭晓结果</h1>
    </div>
    </div>
</div>
<!--通用顶部结束-->
<section>
<div class="scroller create_goods">
<ul class="listitem group_listitem jx_result_ul">
	<span class="rotate">本团夺宝者</span>
       <li class="jx_result_li">
       <a href="javascript:;" class="userindex">
           <img data-original="" class="img js_img lazy"/>
        </a>
       	<div class="text" style="height:125px;padding-top:8px;">
	<p>夺宝冠军：<span><a style="color:#0577ab;" href="javascript:;" class="username userindex">加载中...</a></span></p>
	<p>参与夺宝：<font class="gonumber">加载中...</font>人次</p>
	<p>组团名称：<font class="q_group_name">加载中...</font></p>
	<p>揭晓时间：<font class="q_end_time">加载中...</font></p>
	<p>夺宝时间：<font class="user_shop_time">加载中...</font></p>
	</div>
      </li>
	<div class="result_code">幸运换购码：<font class="resultCode">加载中...</font><a href="javascript:;" class="teamcalResult">计算详情</a></div>
</ul>

<!--轮播器开始-->
  <div class="pPic pPicBor" style="padding-top:5px;background:#fff;">
      <div class="pPic2">
       <div id="sliderBox" class="pImg">
              <div class="loading" style="background:#fff;box-shadow:none;"><b class="loading-img"></b>正在加载</div>
              <ul class="slides">
				<li><img class="lazy" data-original="" class="animClass" /></li>
              </ul>
          </div>
      </div>
  </div>
<!--轮播器结束-->
 <ul class="listitem count_goods" style="background:#fff;">
     <li>
     	<div class="text">
             <p class="goodstitle">加载中...</p>
         	<span>价值 ￥ <font class="gmoney">0.00</font></span>
	<div class="result">本团已揭晓</div>
</div>
</li>
 </ul>
<div class="block10"></div>
	<ul class="listitem user-listitem-line js_result_lli">
        <li style="border-top:1px solid #ddd;">
        	<a href="javascript:;" class="tgoodsdesc">
            <i class="ricon iconfont iconline-arrow-right"></i>
            <div class="text">图文详情</div>
            </a>
        </li>
    </ul>
	
	<ul class="listitem group_listitem">
		<li style="border-bottom:1px solid #ddd;">抢购亲友记录</li>
		<div class="buy_record"></div>
    </ul>
<ul class="search-ul load-more" style="display:none;">
<li><button class="btn btn-block btn-more" id="loadmore" style="background:#fbfbfb;border-color:#ccc;">加载更加</button></li>
	</ul>
</div>
<input type="hidden" value="" name="q_uid" />
</section>
<script type="text/javascript">
apiready = function(){
	var func = "CommonClose('team_item');";
	api.execScript({
		name:'root',
		script:func
	});
	var team_dataserver_id = localData.get('team_goods_id');
	if(!team_dataserver_id){
		api.alert({msg:'参数错误'});
		return;
	}
	
	$('.tgoodsdesc').click(function(){
		 localData.set('team_goods_id',team_dataserver_id);
		 api.openWin({name:'tgoodsdesc',url:'./tgoodsdesc.html',reload:true});	
	});
	
	$('.teamcalResult').click(function(){
		localData.set('team_goods_id',team_dataserver_id);
		api.openWin({name:'team_calresult',url:'./team_calresult.html',reload:true});	
	});
	
	GetJPData(config.url+'/app.php?act=tdataserver',{goods_id:team_dataserver_id},function(data){
		if(data['status'] == 1){
			$('input[name=q_uid]').val(data['item']['q_uid']);
			$('.userindex img').attr('data-original',config.upload_url+'/'+data['item']['q_user']['img']);
			$('.username').text(data['item']['q_user']['username']);
			$('.gonumber').text(data['gorecode']['gonumber']);
			$('.q_group_name').text(data['item']['q_group_name']);
			$('.q_end_time').text(data['item']['q_end_time']);
			$('.user_shop_time').text(data['item']['user_shop_time']);
			$('.resultCode').text(data['item']['q_user_code']);
	        var imgs = '';
	        for(var i in data['item']['picarr']){
	            imgs += '<li><img src="'+config.upload_url+'/'+data['item']['picarr'][i]+'" class="animClass" /></li>';
	        }
	        if(data['item']['picarr'] == ''){
	            imgs += '<li><img src="'+config.upload_url+'/'+data['item']['thumb']+'" class="animClass" /></li>';
	        }
	        if(imgs != ''){
	        	$('.pPic').css('background','#f4f4f4');
	        }
	        $('.pImg .slides').html(imgs);
	        $("#sliderBox").picslider();
	        $('.goodstitle').html(data['item']['title']);
	        $('.gmoney').text(data['item']['money']);
	        
	        if(data['record']){
	        	var html = '';
	        	for(var i in data['record']){
		        	html += '<li style="border-bottom:1px solid #f4f4f4;"><img src="'+config.upload_url+'/'+data['record'][i]['uphoto']+'" width="20%" class="img lazy"/>';
		        	html += '<div class="text" style="height:74px;"><p>';
		        	html += '<div><span style="color:#0577ab;">'+data['record'][i]['username']+'</span>('+data['record'][i]['account']+')</div>';
		        	html += '<div>参与了'+data['record'][i]['gonumber']+'人次</div></p></div></li>';
	        	}
	        	$('.buy_record').html(html);
	        }
	        
	        $('.userindex').click(function(){
	        	var userid = $('input[name=q_uid]').val();
	        	if(!userid)return;
	        	localData.set('userid',userid);
	        	api.openWin({name:'userindex',url:'./userindex.html',reload:true});
	        });
	        
			lyzimg();
		}else{
			
		}
	});
};
</script>
</body>
</html>